/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2011
 */

package com.core.basic.secure.domain;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import common.base.*;
import common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.util.page.*;
import cn.org.rapid_framework.page.*;


import com.core.basic.secure.domain.*;
import com.core.basic.secure.dao.*;
import com.core.basic.secure.service.*;
import com.core.basic.secure.query.*;

/**
 * @author badqiu
 * @author hunhun
 * @since 4.0 
 */


public class RolesHasResources implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "RolesHasResources";
	public static final String ALIAS_ROLES_ID = "rolesId";
	public static final String ALIAS_RESOURCES_ID = "resourcesId";
	public static final String ALIAS_RR_ID = "rrId";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Long rolesId;
	
	private java.lang.Long resourcesId;
	
	private java.lang.Long rrId;
	//columns END

	public RolesHasResources(){
	}

	public RolesHasResources(
		java.lang.Long rrId
	){
		this.rrId = rrId;
	}

	public void setRolesId(java.lang.Long value) {
		this.rolesId = value;
	}
	
	public java.lang.Long getRolesId() {
		return this.rolesId;
	}
	public void setResourcesId(java.lang.Long value) {
		this.resourcesId = value;
	}
	
	public java.lang.Long getResourcesId() {
		return this.resourcesId;
	}
	public void setRrId(java.lang.Long value) {
		this.rrId = value;
	}
	
	public java.lang.Long getRrId() {
		return this.rrId;
	}
	
	private Resources resources;
	
	public void setResources(Resources resources){
		this.resources = resources;
	}
	
	public Resources getResources() {
		return resources;
	}
	
	private Roles roles;
	
	public void setRoles(Roles roles){
		this.roles = roles;
	}
	
	public Roles getRoles() {
		return roles;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("RolesId",getRolesId())
			.append("ResourcesId",getResourcesId())
			.append("RrId",getRrId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRrId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof RolesHasResources == false) return false;
		if(this == obj) return true;
		RolesHasResources other = (RolesHasResources)obj;
		return new EqualsBuilder()
			.append(getRrId(),other.getRrId())
			.isEquals();
	}
}

